Conversation
| * Overall timeout for the Nexus operation. | ||
| */ | ||
| #[Marshal(name: 'scheduleToCloseTimeout', type: DateIntervalType::class)] | ||
| public \DateInterval $scheduleToCloseTimeout; |
There was a problem hiding this comment.
There should also be scheduleToStart and startToCloseTimeout
| /** | ||
| * Description of the workflow that backs a Nexus operation. | ||
| */ | ||
| final class WorkflowHandle |
There was a problem hiding this comment.
I was a little confused by the naming here as it felt a bit like this was a reference to a running workflow, but it's actually the input to a start workflow call.
| $value = NexusHeader::get($lowerHeaders, NexusHeader::OPERATION_TIMEOUT) | ||
| ?? NexusHeader::get($lowerHeaders, NexusHeader::REQUEST_TIMEOUT); |
There was a problem hiding this comment.
These timeouts are separate and shouldn't be combined in this way. The request timeout is used to indicate how long the Nexus handler has to act. The operation timeout is how long the entire thing has to complete including any async activity started by the handler.
We should parse request timeout only here and leave operation timeout in the headers that are passed to the handler.
| $context = new OperationContext( | ||
| service: $cancelRequest->getService(), | ||
| operation: $cancelRequest->getOperation(), | ||
| headers: $headers, | ||
| env: $this->env, | ||
| ); |
There was a problem hiding this comment.
The context here also needs the request timeout parsed as the deadline.
What was changed
Samples: temporalio/samples-php#75
Why?
Checklist
Closes
How was this tested: